<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
</head>

<body>
    <form action="">
        <div class="form-group">
            <label for="uname">姓名</label>
            <input type="text" id="uname" class="from-control" v-model="formDate.uname">
        </div>
        <div class="from-fora-group">
            <label for="age">年龄</label>
            <input type="text" name="" id="age" class="from-control" v-model="formDate.age">
        </div>
        <button class="btn btn-primary" @click.prevent="add">点击</button>
    </form>
    <table class="table table-bordered">
        <tr>
            <td>姓名</td>
            <td>年龄</td>
            <td>操作</td>
        </tr>
        <tr v-for="(item, index) in users" :key="index">
            <td>{{item.uname}}</td>
            <td>{{item.age}}</td>
            <td>
                <button class="btn btn-primary">编辑</button>
                <button class="btn btn-danger">删除</button>
            </td>
        </tr>
    </table>
</body>
<script>
    vue.config.produtionip = false
    let vm = new Vue({
        el: "#root",
        data() {
            users[{
                uname: "张三",
                age: 21
            }, {
                uname: "李四",
                age: 21
            }, {
                uname: "王五",
                age: 21
            }, {
                uname: "赵六",
                age: 21
            }]
        },
    })
</script>

</html>